package com.neoCalf.neoCommon.exception;

import com.neoCalf.neoCommon.enums.ResultCode;
import lombok.Getter;

/**
 * @author 小牛
 * @version 1.0
 * @description TODO
 * @date 2025/4/7 18:12
 */
@Getter
public class AuthException extends RuntimeException {
    private final ResultCode resultCode;

    public AuthException(ResultCode codeEnum) {
        super(codeEnum.getMsg());
        this.resultCode = codeEnum;
    }

    public AuthException(ResultCode codeEnum, String msg) {
        super(msg);
        codeEnum.setMsg(msg);
        this.resultCode = codeEnum;
    }
}
